# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        加一
# Name:         demo3.10
# Description:  利用exec函数实现一个python控制台
# Author:       加一
# Date:         2019/2/8
#-------------------------------------------------------------------------------

scope = { }
codes = ""
print(">>>",end=" ")
while True:
    code= input(" ")
    if code == "":
        exec(codes, scope)
        codes = ""
        print(">>>",end=" ")
        continue
        codes += code + "\n"